package dao;

import entity.User;
import org.apache.ibatis.annotations.Param;
import param.UserParam;

import java.util.List;

/**
 * @Author:石小俊
 * @Date: 2022/12/28 13:57
 * @Version:1.0-SNAPSHOT
 * @Description:
 */
public interface UserDao {

    public void insertUser(User user);
    public void insertUser2(User user);

    public User selectById(Integer id);
    public User selectById2(Integer id);
    public User selectById3(Integer id);

    public void deleteById(Integer id);

    public void updateUser(User user);

    public List<User> selectAll();

    public User selectByUsernameAndPassword(UserParam param);
    public User selectByUsernameAndPassword2(String username,String password);
    public User selectByUsernameAndPassword3(@Param("username") String username,@Param("password") String password);
    public List<User> selectByUsernameAndPassword4(@Param("username") String username,@Param("password") String password);

    public List<User> selectByUsername(String username);
    public List<User> selectByUsername2(String username);

    public void insertReturnPrimaryKey(User user);

    public List<User> selectByParams(User userParam);
    public List<User> selectByParams2(User userParam);
    public List<User> selectByParams3(User userParam);
    public List<User> selectByParams4(User userParam);

    public void updateByParams(User user);

    public List<User> selectByIds(List<Integer> ids);
}
